
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(signal LANGUAGES C)

include_directories(../common)

set(COMPILE_ALL OFF)

list(APPEND _sources
    ../common/error.c
    ../common/pathalloc.c
    ../common/prexit.c
    ../common/tellwait.c
    05_sleep2.c
    ../common/prmask.c
    15_abort.c
    ../common/sleep.c
)

if (COMPILE_ALL)
add_executable(sigusr 01_sigusr.c ${_sources})
add_executable(reenter 02_reenter.c ${_sources})
add_executable(child 03_child.c ${_sources})
add_executable(tsleep2 06_tsleep2.c ${_sources})
add_executable(read1 07_read1.c ${_sources})
add_executable(read2 08_read2.c ${_sources})
add_executable(critical 10_critical.c ${_sources})
add_executable(mask 12_mask.c ${_sources})
add_executable(suspend1 13_suspend1.c ${_sources})
add_executable(suspend2 14_suspend2.c ${_sources})
add_executable(systest2 16_systest2.c ${_sources})
else()
add_executable(sigtstp 17_sigtstp.c ${_sources})
endif()
